<%@ page import='es.ats.codington.festival.domain.Event' %>
<%@ page import="java.util.ArrayList" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">


<link type="text/css" rel="stylesheet" href="css/mystyle.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js?ver=1.4.2"></script>
    <script src="js/login.js"></script>
</head>
<body>

 <div id="container"> <!--para centrar cuadro-->
   <!-- Login Starts Here -->
    <header>
   <nav>
  <ul class="nav1">
  <li id="logo" ><img src="./images/logo.jpg"></li>
<li id="ref1"><a href="showmy_event.htm">My Events</a></li> 
<li id="ref1"><a href="pre_updatepassword.htm">Update password</a></li>
<li id="ref1"><a href="pre_updatedata.htm">Update information</a></li> 


</ul>
</nav>
</header>
  <%String usu=(String)session.getAttribute("username"); %>
<% String pass=(String)session.getAttribute("password"); %>
<nav id="loginContainer">
 </form id="loginForm">
 
<form class="UpdatePassServlet" action="pre_logout.htm" method="GET" >
			<input id="loginButtonOut" type="submit" value="Logout" />
				<!-- <a href="LogoutServlet" id="loginButtonOut" ><span>Logout</span><em></em></a> -->
				<h3> Bienvenido <%=usu%></h3> 
				</form>

		 </nav>
	
	
<aside id="columna">
	
		
	
	
        <p class="Sub_title">MENU</p>

			<ul class="nav2">
				<ul>
				<li><a href="home.htm">Home</a></li>
				<br>
				<li><a href="history.htm">History</a></li>
				<br>
				<li><a href="">North Places<br></a>
				<br>
				<ul>
				<article class="menunorth">
				<li><a href="listmuseum.htm?type=Museum">Museum</a></li>
				<br>
				<li><a href="listtheater.htm?type=Theater">Theater</a></li>
				<br>
				<li><a href="liststadium.htm?type=Stadium">Stadium</a></li>
				<br>
				<li><a href="listbusiness.htm?type=large Business">Large Business</a></li>
				</article>
				</ul>
				</li>
				<li><a href="">South Places</a>
				<ul>
				<article class="menusouth">
				<li><a href="listzoo.htm?type=Zoo">Zoo</a></li>
				<br>
				<li><a href="listpark.htm?type=Park">Park</a></li>
				<br>
				<li><a href="listattraction.htm?type=Tourist Attraction">Turist Attraction</a></li>
				<br>
				<li><a href="listmarket.htm?type=Traditional Market">Traditional Market</a></li>
				</article>
				</ul>
				</li> 
			</ul>
	
	
	</aside>
	
	
	<hgroup>
        <p>Festival Registration System</p>
   	</hgroup>
	<section class="cuadroblanco">
	<article class="Sub_title">
        <p>New Event Registration Page</p>
   	</article>

	
    <article class="div_borde"> 
	<article id=tabla2>
        <form id="form2" class="ViewAllEventServlet" action="show_event.htm" method="GET">
			
			
			
			<% Event event  = new Event(); %>
			
			<% event = (Event) request.getAttribute("evento"); %>
		<table>
		
			<tr>
				<td for="eventname"><strong>NAME</strong></td>
				<td for="Places"><strong> DESCRIPTION</strong></td>
				<td for="price" ><strong>PRICE</strong></td>
				<td for="availabletickets" ><strong>SEATS</strong></td>
			</tr>
			
			<tr>
				<td> <%=event.getNamevent()%>  </td>
				<td> <%=event.getDescription()%></td>
				<td> <%=event.getPrice()%></td>
				<td> <%=event.getSeats()%></td>
			</tr>
	
			
			<%   Object iD = session.getAttribute("iDVisitor");
		    int id= (Integer) iD; 
		    
		    if (id==1){%>
		    
		    	<table align="center">
             
                <tr>
                    <td><a href="neweventregistration.jsp?idevent=<%=event.getiDevent()%>">
                                                           
                    <input type="button" value="Update Event">
                    </td>
                                 
                </tr>
            </table>
		    <% }else{
		    	String myString = (String) request.getAttribute("signed");
		    	boolean signed = Boolean.parseBoolean(myString);
		       	if(signed==false)  {	%>
		    
		    <table align="center">
                
                <tr>
                    <td><a href="signup_event.htm?idevent=<%=event.getiDevent()%>">
                    <input type="button" value="Register to event">
                    </td>
                
                </tr>
            </table>
            <%}else{ %>
		    	<table align="center">
                
                
                <tr>
                    <td><a href="unsignup_event.htm?idevent=<%=event.getiDevent()%>">
                    <input type="button" value="Unregister to event">
                    </td>
                
                </tr>
            </table>
		    			    	
		   <% }}%>

			</table>
</form>
</article>
   </article>
		 </br></br>
	</section>
	<section class="cuadromessage">	
		<article class="div_borde"> 
		<table  id="mesj">
		<% String msg =(String) request.getAttribute("msg");
		if(msg==null){ 
		}else{ %>
			<tr>
			 <td for="error"><%=msg %> </td>
			 
			</tr>
		<%} %>
				
		</table>	
		</article> 
	</section>
 
 
</body>
</html>